-
-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New: Do not exclude dot files by default #55
New: Do not exclude dot files by default #55
Conversation
|
||
## Frequently Asked Questions | ||
|
||
Q: Do you have real examples of JavaScript dot files in projects where the authors are under the false assumption that those files are linted, where in truth, the are not? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another example here: In Ember applications we actually ended up adding !.*
to the default .eslintignore
due to folks accidentally assuming they were already checked.
More info / background also in eslint/eslint#10341
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In theory, I support linting dotfiles and dotfolders by default. I agree that it is unexpected that .*.js
files are ignored by default. Having dotfiles linted by default would also mean that the end user would be notified immediately if they are linting things they don't intend to (because they would warn), rather than silently ignoring files they believe are being linted.
All that being said, this could cause a lot of pain in the ecosystem, and I'm wary of making a change that could have such a huge ripple effect. One possible solution to this would be to change the default ignore patterns only when using eslint.config.js, since that's an opt-in path and won't break existing CI builds. I don't want to tie that RFC to this change, though, since it's been in the works so long and it sounds like we're finally reaching consensus on the feature set.
@kaicataldo is there test infrastructure to see some example breaking changes, please? |
@mightyiam Can you clarify what you mean? |
A test that clones many projects that use ESLint, upgrades the version of ESLint and attempts to run their lint command to obtain examples of actual ecosystem breakage. |
We don't have infrastructure to do this. I'm also not sure it's necessary, given how clear of a breaking change this is. Note that this change isn't limited to configuration dotfiles. As a concrete example, many popular tools create caches (Gatsby creates a |
And to be clear, doing a test like the above wouldn't necessarily give us the data we need. The needs and setups of open source projects versus closed source applications can be very different. |
I agree with the premise here — less magic is better. I also agree that it’s a major breaking change and like @kaicataldo’s suggestion about waiting to make such a change until it can be shipped with the new config system. Since the ignore mechanism is tied in and will be changing anyway, that would be the best opportunity to incorporate a change like this. |
Yes, I can work this into #9 so we have a holistic view of the changes. |
I've incorporated this into #7, so closing. |
Summary
ESLint excludes dot files (files whose names begin with
.
) by default.This is a proposal to remove this default exclusion.